#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 2e5 + 5;
const int M = 1e9 + 7;

int n, s[N], t[N];
int dp[N << 1];

int f(int x) {
    return x > n ? x - n : x;
}

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);

    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> s[i];
    
    for (int i = 1; i <= n; i++)
        cin >> t[i];

    memset(dp, 0x3f, sizeof(dp));
    for (int i = 1; i <= 2*n; i++) {
        dp[i] = min(dp[i-1]+s[f(i-1)], t[f(i)]);
    }

    for (int i = 1; i <= n; i++) {
        cout << min(dp[i], dp[i+n]) << endl;
    }
    return 0;
}